﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Reflection;

namespace PocketMahjong
{
	public partial class AboutForm : Form
	{
		public AboutForm()
		{
			InitializeComponent();
			pictureBox1.Image = Properties.Resources.Dragon3;

			var asm = Assembly.GetExecutingAssembly();
			var ver = asm.GetName().Version;
			var desc = (AssemblyDescriptionAttribute)Attribute.GetCustomAttribute(
				   asm, typeof(AssemblyDescriptionAttribute));
			var title = (AssemblyTitleAttribute)Attribute.GetCustomAttribute(
				   asm, typeof(AssemblyTitleAttribute));
			var copy = (AssemblyCopyrightAttribute)Attribute.GetCustomAttribute(
				   asm, typeof(AssemblyCopyrightAttribute));

			label1.Text = string.Format("{0} {1}.{2}", title.Title, ver.Major, ver.Minor);
			label2.Text = desc.Description;
			label3.Text = copy.Copyright;
		}
	}
}